package com.betterwood.dragon.entity.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * Created by zhengyanhua on 2021/3/26.
 */
@Data
public class QueryByTimeAndPhone {

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    //@NotNull(message = "起始时间不能为空")
    private LocalDateTime startTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    //@NotNull(message = "结束时间不能为空")
    private LocalDateTime endTime;

    private String phone;

    @NotBlank(message = "shopId不能为空")
    private String shopId;
}
